//
//  CreditCard.swift
//  Automobile
//
//  Created by erkebulan elzhan on 7/27/20.
//  Copyright © 2020 erkebulan elzhan. All rights reserved.
//

import Foundation


@propertyWrapper
struct CreditCard {
    private(set) var value: String = ""
    
    var wrappedValue: String {
        get { value }
        set {
            value = "****" + String(newValue.suffix(4))
        }
    }
    init(initialValue: String) {
        self.wrappedValue = initialValue
    }
}
